<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改账号分类配置')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-account-edit" th:object="${categoryAccount}">
        <input name="id" th:field="*{id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">分类ID：</label>
            <div class="col-sm-8">
                <input class="form-control" name="cateId" th:field="*{cateId}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">分类名称：</label>
            <div class="col-sm-8">
                <input class="form-control" name="cateName" th:field="*{cateName}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">状态：</label>
            <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('biz_data_state')}">
                    <input name="dataState" th:field="*{dataState}" th:id="${'dataState_' + dict.dictCode}"
                           th:value="${dict.dictValue}" type="radio">
                    <label th:for="${'dataState_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">平台：</label>
            <div class="col-sm-8">
                <select class="form-control m-b" name="platform"
                        th:with="type=${@dict.getType('biz_account_platform')}">
                    <option th:each="dict : ${type}" th:field="*{platform}" th:text="${dict.dictLabel}"
                            th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">公众号：</label>
            <div class="col-sm-8">
                <input class="form-control" name="name" th:field="*{name}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">微信号：</label>
            <div class="col-sm-8">
                <input class="form-control" name="wxAlias" th:field="*{wxAlias}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">wx biz：</label>
            <div class="col-sm-8">
                <input class="form-control" name="wxBiz" th:field="*{wxBiz}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">wx origin id：</label>
            <div class="col-sm-8">
                <input class="form-control" name="wxOriginId" th:field="*{wxOriginId}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">头像：</label>
            <div class="col-sm-8">
                <input class="form-control" name="avatar" th:field="*{avatar}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">二维码：</label>
            <div class="col-sm-8">
                <input class="form-control" name="qrcode" th:field="*{qrcode}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">预估粉丝数：</label>
            <div class="col-sm-8">
                <input class="form-control" name="fansNumEstimate" th:field="*{fansNumEstimate}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">描述：</label>
            <div class="col-sm-8">
                <textarea class="form-control" name="description">[[*{description}]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">总排名：</label>
            <div class="col-sm-8">
                <input class="form-control" name="rank" th:field="*{rank}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">分类排名：</label>
            <div class="col-sm-8">
                <input class="form-control" name="cateRank" th:field="*{cateRank}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">发布次数：</label>
            <div class="col-sm-8">
                <input class="form-control" name="pushTotal" th:field="*{pushTotal}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">篇数：</label>
            <div class="col-sm-8">
                <input class="form-control" name="articlesTotal" th:field="*{articlesTotal}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">总阅读数：</label>
            <div class="col-sm-8">
                <input class="form-control" name="readNumTotal" th:field="*{readNumTotal}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">平均阅读数：</label>
            <div class="col-sm-8">
                <input class="form-control" name="avgReadNum" th:field="*{avgReadNum}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">头条：</label>
            <div class="col-sm-8">
                <input class="form-control" name="topReadNumAvg" th:field="*{topReadNumAvg}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">头条：</label>
            <div class="col-sm-8">
                <input class="form-control" name="topLikeNumAvg" th:field="*{topLikeNumAvg}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">单篇最大阅读数：</label>
            <div class="col-sm-8">
                <input class="form-control" name="readNumMax" th:field="*{readNumMax}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">平均在看数：</label>
            <div class="col-sm-8">
                <input class="form-control" name="avgLikeNum" th:field="*{avgLikeNum}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">评分数：</label>
            <div class="col-sm-8">
                <input class="form-control" name="indexScores" th:field="*{indexScores}" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">统计时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <input class="form-control" name="statTime"
                           placeholder="yyyy-MM-dd" th:value="${#dates.format(categoryAccount.statTime, 'yyyy-MM-dd')}"
                           type="text">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
    var prefix = ctx + "cms/account";
    $("#form-account-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-account-edit').serialize());
        }
    }

    $("input[name='statTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>